package cn.tedu.spring.user;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Author：程Sir
 * Name： SpringTest01
 * Content:
 */
@Configuration // 表示当前的类是一个配置类
//@ComponentScan("cn.tedu.spring.user")
public class UserConfig {
    @Bean(initMethod = "initUser", destroyMethod = "destroyUser")
    public User user(){
        User user = new User();
        return user;
    }
}
